#include "gtest/gtest.h"
#include <mockcpp/mokc.h>
#include <mockcpp/mockcpp.hpp>

#include <vector>
#include <iostream>

#include "topoinfo_struct.h"
#include "log.h"
#include "checker.h"
#include "virtual_topo.h"
#include "testcase_utils.h"

using namespace hccl;

class BroadcastTest : public testing::Test {
protected:
    static void SetUpTestCase()
    {
        std::cout << "BroadcastTest set up." << std::endl;
    }

    static void TearDownTestCase()
    {
        std::cout << "BroadcastTest tear down." << std::endl;
    }

    virtual void SetUp()
    {
        const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info();
        std::string caseName = "analysis_result_" + std::string(test_info->test_case_name()) + "_" + std::string(test_info->name());
        Checker::SetDumpFileName(caseName);
    }

    virtual void TearDown()
    {
        Checker::SetDumpFileName("analysis_result");
        GlobalMockObject::verify();
        // 这边每个case执行完成需要清理所有的环境变量，如果有新增的环境变量，需要在这个函数中进行清理
        ClearHcclEnv();
    }
};

TEST_F(BroadcastTest, broadcast_opbase_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 1, 3);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 300;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_two_servers_opbase_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_offload_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 1, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OFFLOAD;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

// 除了有数据的server，其他server存在无效的数据拷贝
TEST_F(BroadcastTest, broadcast_two_servers_offload_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OFFLOAD;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_BroadCastComm_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 1, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastComm";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;

    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

// 跑BroadcastNHRV1
TEST_F(BroadcastTest, broadcast_BroadcastNHRV1)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 4, 4);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:NA;level1:NHR_V1", 1);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastComm";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcastmesh_BroadcastNHRV1)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 4, 4);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:fullmesh;level1:NHR_V1", 1);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastMeshExecutor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcastring_BroadcastNHRV1)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 4, 8);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:ring;level1:NHR_V1", 1);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastRingExecutor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcastring_910C_BroadcastNHRV1)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 4, 2);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:ring;level1:NHR_V1", 1);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastRingFor91093Executor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

#ifdef ASCEND_310P_DEVICE
TEST_F(BroadcastTest, broadcast_310P_BroadcastNHRV1)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 4);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:ring;level1:NHR_V1", 1);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadcastPlusBroadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_310P1;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}
#endif

TEST_F(BroadcastTest, broadcast_BroadCastRingExecutor_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastRingExecutor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;

    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

// 存在无效的数据拷贝
TEST_F(BroadcastTest, broadcast_BroadCastRingFor91093Executor_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 2, 1, 4);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastRingFor91093Executor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.DataDes.count = 10000;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;

    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_BroadCastRingFor91093Executor_single_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 1, 4);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastRingFor91093Executor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.DataDes.count = 10000;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;

    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_BroadCastSmallCountExecutor_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 1, 8);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.algName = "BroadCastSmallCountExecutor";
    testOpParam.opMode = OPBASE;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT32;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;

    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_smallcount_multiserver_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 4);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OFFLOAD;

    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT8;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_ax_4server_16p)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 4, 16);
    gen.GenRankTable(topoMeta, ranktable);

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT8;
    testOpParam.devtype = DevType::DEV_TYPE_910B;
    testOpParam.root = 0;
    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);

    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_mix_BroadcastMixExecutor)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;

    /***** GenTopoMeta Start *****/
    TopoMeta topoMeta;
    SuperPodMeta superPodMeta;
    ServerMeta serverMeta910B;
    u32 rankNum910B = 16;
    for (u32 k = 0; k < rankNum910B; k++) {
        serverMeta910B.push_back(k);
    }
    superPodMeta.push_back(serverMeta910B);
    ServerMeta serverMeta91093;
    u32 rankNum91093 = 16;
    for (u32 k = 0; k < rankNum91093; k++) {
        serverMeta91093.push_back(k);
    }
    superPodMeta.push_back(serverMeta91093);

    topoMeta.push_back(superPodMeta);
    /***** GenTopoMeta End *****/

    /***** GenRankTable Start *****/
    gen.GenRankTable(topoMeta, ranktable);
    for (auto &rankInfo : ranktable.rankList) {
        if (rankInfo.serverIdx == 0) {
            rankInfo.deviceInfo.deviceType = DevType::DEV_TYPE_910B;
        } else {
            rankInfo.deviceInfo.deviceType = DevType::DEV_TYPE_910_93;
        }
    }
    /***** GenRankTable End *****/

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_FP32;
    testOpParam.root = 0;
    testOpParam.devTypes.insert(DevType::DEV_TYPE_910B);
    testOpParam.devTypes.insert(DevType::DEV_TYPE_910_93);

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);
    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_mix_BroadcastMixExecutorComm)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;

    /***** GenTopoMeta Start *****/
    TopoMeta topoMeta;
    SuperPodMeta superPodMeta;
    ServerMeta serverMeta910B;
    u32 rankNum910B = 1;
    for (u32 k = 0; k < rankNum910B; k++) {
        serverMeta910B.push_back(k);
    }
    superPodMeta.push_back(serverMeta910B);
    ServerMeta serverMeta91093;
    u32 rankNum91093 = 1;
    for (u32 k = 0; k < rankNum91093; k++) {
        serverMeta91093.push_back(k);
    }
    superPodMeta.push_back(serverMeta91093);

    topoMeta.push_back(superPodMeta);
    /***** GenTopoMeta End *****/

    /***** GenRankTable Start *****/
    gen.GenRankTable(topoMeta, ranktable);
    for (auto &rankInfo : ranktable.rankList) {
        if (rankInfo.serverIdx == 0) {
            rankInfo.deviceInfo.deviceType = DevType::DEV_TYPE_910B;
        } else {
            rankInfo.deviceInfo.deviceType = DevType::DEV_TYPE_910_93;
        }
    }
    /***** GenRankTable End *****/

    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.DataDes.count = 100;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_FP32;
    testOpParam.root = 0;
    testOpParam.devTypes.insert(DevType::DEV_TYPE_910B);
    testOpParam.devTypes.insert(DevType::DEV_TYPE_910_93);

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);
    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_BroadCastRingFor91093Executor_NHR)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 2, 2, 8);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:NA;level1:NHR;level2:NHR", 1);
    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.DataDes.count = 100;
    testOpParam.root = 0;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT8;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.algName = "BroadCastRingFor91093Executor";

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);
    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_BroadCastRingFor91093Executor_NB)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 2, 2, 8);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:NA;level1:NB;level2:NB", 1);
    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OPBASE;
    testOpParam.DataDes.count = 100;
    testOpParam.root = 0;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT8;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;
    testOpParam.algName = "BroadCastRingFor91093Executor";

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);
    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}

TEST_F(BroadcastTest, broadcast_A3_2Server1Rank_nb_test)
{
    RankTable_t ranktable;
    RankTable_For_LLT gen;
    TopoMeta topoMeta;
    gen.GenTopoMeta(topoMeta, 1, 2, 1);
    gen.GenRankTable(topoMeta, ranktable);

    setenv("HCCL_ALGO", "level0:NA;level1:NB", 1);
    TestOpParam testOpParam;
    testOpParam.opType = HcclCMDType::HCCL_CMD_BROADCAST;
    testOpParam.tag = "broadcast";
    testOpParam.opMode = OFFLOAD;
    testOpParam.DataDes.count = 100;
    testOpParam.root = 0;
    testOpParam.DataDes.dataType = HcclDataType::HCCL_DATA_TYPE_INT8;
    testOpParam.devtype = DevType::DEV_TYPE_910_93;

    Checker checker;
    HcclResult ret;
    ret = checker.Check(testOpParam, ranktable, topoMeta);
    EXPECT_EQ(ret, HcclResult::HCCL_SUCCESS);
}